﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProxyWrapper.ScansProxy;
namespace ProxyWrapper
{
    public class ScansServiceWrapper
    {
        private ScansDataSoapClient _client = null;

        public List<Scans> ListScans(SearchParams _scan)
        {
            try
            {
                _client = new ScansDataSoapClient();
                Scans[] _result = _client.GetScans(_scan);
                
                if (_result != null)
                    return _result.ToList<Scans>();
                else
                    return null;

            }
            catch (Exception)
            {
                return null;
            }
        }

        public string ArchiveScans(int clientId,int scanId, string hashCode)
        {
            _client = new ScansDataSoapClient();
            return _client.ArchiveScans(clientId,scanId,hashCode);
        }
    }
}
